package com.ibeetl.cms.web.query;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 *Excel
 */
public class ExcelQuery extends PageParam {
    private Integer id;

    //限制查询范围所用
    private String limitId;

    @Query(name = "业务事项", display = true, type = Query.TYPE_DICT, dict = "businessMatters", group = "businessMatters")
    private String businessMatters;

    @Query(name="上报日期",display=true,type=Query.TYPE_DATE_BETWEEN)
    private String date;

    @Query(name = "业务状态", display = true, type = Query.TYPE_DICT, dict = "businessState", group = "businessState")
    private String businessStateCode;

    @Query(name = "姓名", display = true)
    private String name ;

    @Query(name = "证件号码", display = true)
    private String identificationNumber ;

    //企业名称
    private String enterprisName;

    //统一社会信用代码
    private String organizationCode ;

    @Query(name = "年度:", display = true)
    private String year;

    private Date createDateMin;
    private Date createDateMax;

    //业务事项所对应的表
    private String Classname;

    //导出模板地址
    private String excelTemplate;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
        if(StringUtils.isEmpty(date)) {
            return ;
        }
        Date[] ds = Tool.parseDataRange(date);
        this.createDateMin=ds[0];
        this.createDateMax =ds[1];
    }

    public Date getCreateDateMin() {
        return createDateMin;
    }

    public void setCreateDateMin(Date createDateMin) {
        this.createDateMin = createDateMin;
    }

    public Date getCreateDateMax() {
        return createDateMax;
    }

    public void setCreateDateMax(Date createDateMax) {
        this.createDateMax = createDateMax;
    }

    public String getClassname() {
        return Classname;
    }

    public void setClassname(String classname) {
        Classname = classname;
    }

    public String getBusinessMatters() {
        return businessMatters;
    }

    public void setBusinessMatters(String businessMatters) {
        this.businessMatters = businessMatters;
    }

    public String getBusinessStateCode() {
        return businessStateCode;
    }

    public void setBusinessStateCode(String businessStateCode) {
        this.businessStateCode = businessStateCode;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLimitId() {
        return limitId;
    }

    public void setLimitId(String limitId) {
        this.limitId = limitId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIdentificationNumber() {
        return identificationNumber;
    }

    public void setIdentificationNumber(String identificationNumber) {
        this.identificationNumber = identificationNumber;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getEnterprisName() {
        return enterprisName;
    }

    public void setEnterprisName(String enterprisName) {
        this.enterprisName = enterprisName;
    }

    public String getOrganizationCode() {
        return organizationCode;
    }

    public void setOrganizationCode(String organizationCode) {
        this.organizationCode = organizationCode;
    }

    public String getExcelTemplate() {
        return excelTemplate;
    }

    public void setExcelTemplate(String excelTemplate) {
        this.excelTemplate = excelTemplate;
    }
}
